﻿@* Generator: Template
    GeneratePrettyNames : true *@
@functions{
    public NFinal.Compile.Template.RazorAutoCompleteModel Model { get; set; }
}
//======================================================================
//
//        Copyright : Zhengzhou Strawberry Computer Technology Co.,LTD.
//        All rights reserved
//        
//        Application:NFinal MVC framework
//        Filename :@{@Model.modelClassName}.cs
//        Description :模板提示类
//
//        created by Lucas at  2015-6-30`
//     
//        WebSite:http://www.NFinal.com
//
//======================================================================
using System;
using System.Collections.Generic;

namespace @{@Model.modelNameSpace}
{
	//数据库模型
    @{@Model.StructDatas}
	//函数内变量
    public class @{@Model.modelClassName}:@{@Model.baseName}
    {
		/*参数变量*/
		@foreach (var parameterData in Model.parameterDataList) {
			if (parameterData.isArray) {
                @:/// <summary>
                @:/// @{@parameterData.parameterCommit}
                @:/// </summary>
                    @:public @{@parameterData.type}[] @{@parameterData.name};
			} else {
				@:/// <summary>
				@:/// @{@parameterData.parameterCommit}
				@:/// </summary>
				@:public @{@parameterData.type} @{@parameterData.name};
			}
        }
		/*数据库变量*/
		@foreach(var functionData in Model.functionDataList) {
            if (functionData.type == "var") {
				@:/// <summary>
				@:/// @{@functionData.varCommit}
				@:/// </summary>
				if (functionData.functionName == "Delete") {
                    @:public int @{@functionData.varName};
				}
                if (functionData.functionName == "ExecuteNonQuery") {
                    @:public int @{@functionData.varName};
				}
                if (functionData.functionName == "Insert") {
                    @:public int @{@functionData.varName};
				}
                if (functionData.functionName == "Page") {
                    @:public List<__@{@Model.methodName}_@{@functionData.varName}__> @{@functionData.varName};
				}
                if (functionData.functionName == "QueryAll") {
                    @:public List<__@{@Model.methodName}_@{@functionData.varName}__> @{@functionData.varName};
				}
                if (functionData.functionName == "QueryObject") {
                    @:public @{@functionData.type} @{@functionData.varName};
				}
                if (functionData.functionName == "QueryRandom") {
                    @:public List<__@{@Model.methodName}_@{@functionData.varName}__> @{@functionData.varName};
				}
                if (functionData.functionName == "QueryTop") {
                    @:public List<__@{@Model.methodName}_@{@functionData.varName}__> @{@functionData.varName};
				}
                if (functionData.functionName == "QueryRow") {
                    @:public __@{@Model.methodName}_@{@functionData.varName}__ @{@functionData.varName};
				}
                if (functionData.functionName == "Update") {
                    @:public int @{@functionData.varName};
			    }
			}
		}
		/*一般变量*/
		@foreach(var csharpDeclaration in Model.csharpDeclarationList) {
            @:/// <summary>
            @:/// @{@csharpDeclaration.comment}
            @:/// </summary>
                @:public @{@csharpDeclaration.typeName} @{@csharpDeclaration.varName};
		}
		/*DAL函数声明变量*/
    }
}